<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>

	<c:set value="${requestScope.rubbish }" var="rubbish"></c:set>
	<form action="<%=path%>/web/question/addQList" method="post">
<dl>
        <dt>名称</dt>
        <dd><input id="rub" type="hidden" name="rubbish.id" value="${rubbish.id }">
        <input value="${rubbish.name }" name="Number1" type="text" disabled="disabled" aria-label="系统匹配废弃物名称" placeholder="系统匹配废弃物名称"></dd>
        <input type="hidden" value="${sessionScope.userinfo.id }" name="userinfo.id">
      </dl>
      <dl>
        <dt>所属类型</dt>
        <dd><input value="${rubbish.secondtype.title }" disabled="disabled" name="Number1" type="text" aria-label="匹配父级分类" placeholder="匹配父级分类"></dd>
      </dl>
      <dl>
      <dt>提问内容</dt>
      <dd>
        <textarea id="con" name="content" cols="80" rows="20"></textarea>
      </dd>
     </dl>
     
      <div class="submit">
          <input type="submit" name="submit" id="submit" value="提交">
           <input type="button" name="back" id="back" value="重置">
      </div>
      </form>
<script type="text/javascript" src="<%=path%>/static/managecss/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="<%=path%>/static/managecss/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="<%=path%>/static/managecss/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="<%=path%>/static/managecss/lib/jquery/1.9.1/jquery.min.js"></script>    
	<script type="text/javascript">
	$(function(){
		var f= false;
		
		$("#submit").click(function(){
			var con = $("#con").val();
			var rub = $("#rub").val();
			if(rub=="")
				{
					layer.alert("请在网页上方选择垃圾提问！");
					f=false;
				}
			if(con=="")
				{
					layer.alert("问题内容不能空着！");
				}
			if(rub!=""&&con!=""){
				f=true;	
			}
		})
		
		$("form").submit(function(){
			return f;
		})
	})	
			
			/* 撤销所有 */
			$(function() {
				$("#back").click(function() {
				
					$("input[type!=submit]").val("");
				})		
			})
	</script>

	
	
	
	
	
	
	
	
	
	
	
	
	